package com.yhkj.data.mq.message;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author <a href="mailto:idler41@163.con">linfuxin</a> created on 2023-02-28 16:02:12
 */
@Data
public class TableMetaData implements Serializable {

    /**
     * 表名
     */
    @NotNull
    private String tableName;

    /**
     * 主键下标
     */
    private Integer[] keysIndex;

    /**
     * 主键列名
     */
    private String[] keysColumnName;

    /**
     * 列名称
     */
    @NotNull
    @Size(min = 1)
    private String[] columnNames;

    /**
     * 数据类型
     *
     * @see java.sql.Types
     */
    @NotNull
    @Size(min = 1)
    private int[] types;
}
